package com.example.jurisdiction.Controller;

import java.util.List;

import com.example.jurisdiction.Service.MenusService;
import entity.Tree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;




@CrossOrigin(methods= {RequestMethod.POST,RequestMethod.GET})
@Controller
@RequestMapping("/maven")
public class MenusCont {
	
	@Autowired
	private MenusService ms;
	
	@RequestMapping("/list.do")
	public @ResponseBody List<Tree> list(){
		return ms.getQuery();
	}
}
